function calculate()
{
	var input = document.getElementById('input');
	var inputValue = input.value;
	var first = document.getElementById('first');
	var firstValue = first.value;
	var second = document.getElementById('second');
	var secondValue = second.value;	

	if (firstValue == secondValue) {
		document.getElementById('result').innerHTML = inputValue;
		alert(firstValue);
	} else {		
		if (firstValue == 'kg'){
			var result = inputValue * 2.20462262;
			document.getElementById('result').innerHTML = result;
		} else {
			var result = inputValue / 2.20462262;
			document.getElementById('result').innerHTML = result;
		}
	}
}